package com.seanLab.web;

import com.seanLab.domain.Body;
import com.seanLab.dto.EditorArticleDto;
import com.seanLab.dto.RecommendArticleDto;
import com.seanLab.service.ImageService;
import com.seanLab.service.RecommendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ailly on 17-9-21.
 */
@RestController
@RequestMapping("/v1/images")
public class RecommendController {
    @Autowired
    private RecommendService recommendService;

    @RequestMapping(path = "/queries", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    public Body recommendImages(@RequestBody RecommendArticleDto recommendArticleDto) {
        Body body = this.recommendService.recommendImages(recommendArticleDto);
        return body;
    }

}
